package com.isdepci.project.carbon.service.impl;

import com.isdepci.project.carbon.domain.GreenCertificateManagement;
import com.isdepci.project.carbon.domain.StationInfo;
import com.isdepci.project.carbon.mapper.GreenCertificateManagementMapper;
import com.isdepci.project.carbon.mapper.StationInfoMapper;
import com.isdepci.project.carbon.service.IGreenCertificateManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 绿证管理Service业务层处理
 *
 * @author isdepci
 * @date 2023-05-19
 */
@Service
public class GreenCertificateManagementServiceImpl implements IGreenCertificateManagementService {
    @Autowired
    private GreenCertificateManagementMapper greenCertificateManagementMapper;
    @Autowired
    private StationInfoMapper stationInfoMapper;
    /**
     * 查询绿证管理
     */
    @Override
    public GreenCertificateManagement selectGreenCertificateManagementById(Long id){
        return greenCertificateManagementMapper.selectGreenCertificateManagementById(id);
    }

    /**
     * 查询绿证管理列表
     */
    @Override
    public List<GreenCertificateManagement> selectGreenCertificateManagementList(GreenCertificateManagement greenCertificateManagement){
        return greenCertificateManagementMapper.selectGreenCertificateManagementList(greenCertificateManagement);
    }

    /**
     * 新增绿证管理
     */
    @Override
    public int insertGreenCertificateManagement(GreenCertificateManagement greenCertificateManagement){
        return greenCertificateManagementMapper.insertGreenCertificateManagement(greenCertificateManagement);
    }

    /**
     * 修改绿证管理
     */
    @Override
    public int updateGreenCertificateManagement(GreenCertificateManagement greenCertificateManagement){
        return greenCertificateManagementMapper.updateGreenCertificateManagement(greenCertificateManagement);
    }

    /**
     * 批量删除绿证管理
     */
    @Override
    public int deleteGreenCertificateManagementByIds(Long[] ids){
        return greenCertificateManagementMapper.deleteGreenCertificateManagementByIds(ids);
    }

    /**
     * 删除绿证管理信息
     */
    @Override
    public int deleteGreenCertificateManagementById(Long id){
        return greenCertificateManagementMapper.deleteGreenCertificateManagementById(id);
    }

    @Override
    public List<StationInfo> selectStationInfoDict() {
        return stationInfoMapper.selectStationInfoDict();
    }
}
